//
//  TaskDiaoDuOrderCell.m
//  LogisticsSupplier
//
//  Created by 吕晶 on 2021/4/2.
//  Copyright © 2021 吕晶. All rights reserved.
//

#import "TaskDiaoDuOrderCell.h"

@interface TaskDiaoDuOrderCell ()

@property (nonatomic, strong) UIView *bgView;

@property (nonatomic, strong) UIView *addressBGView;
@property (nonatomic, strong) UILabel *fromAddLab;
@property (nonatomic, strong) UIImageView *statusImgView;
@property (nonatomic, strong) UILabel *toAddLab;

@property (nonatomic, strong) UIImageView *faImgView;
@property (nonatomic, strong) UILabel *faAddressLab;
@property (nonatomic, strong) UILabel *faDetailLab;
@property (nonatomic, strong) UILabel *faInfoLab;
@property (nonatomic, strong) UILabel *marginLine;
@property (nonatomic, strong) UIImageView *shouImgView;
@property (nonatomic, strong) UILabel *shAddressLab;
@property (nonatomic, strong) UILabel *shDetailLab;
@property (nonatomic, strong) UILabel *shInfoLab;
@property (nonatomic, strong) UILabel *linkLine;
@property (nonatomic, strong) UILabel *marginLine2;

@property (nonatomic, strong) UILabel *goodTitleLab;
@property (nonatomic, strong) UILabel *goodPieceTitleLab;
@property (nonatomic, strong) UILabel *goodPieceLab;
@property (nonatomic, strong) UILabel *goodCountTitleLab;
@property (nonatomic, strong) UILabel *goodCountLab;
@property (nonatomic, strong) UILabel *goodWeightTitleLab;
@property (nonatomic, strong) UILabel *goodWeightLab;
@property (nonatomic, strong) UILabel *goodVolumeTitleLab;
@property (nonatomic, strong) UILabel *goodVolumeLab;
@property (nonatomic, strong) UILabel *zhuangTitleLab;
@property (nonatomic, strong) UILabel *zhuangPieceTitleLab;
@property (nonatomic, strong) UILabel *zhuangPieceLab;
@property (nonatomic, strong) UILabel *zhuangCountTitleLab;
@property (nonatomic, strong) UILabel *zhuangCountLab;
@property (nonatomic, strong) UILabel *zhuangWeightTitleLab;
@property (nonatomic, strong) UILabel *zhuangWeightLab;
@property (nonatomic, strong) UILabel *zhuangVolumeTitleLab;
@property (nonatomic, strong) UILabel *zhuangVolumeLab;

@end

@implementation TaskDiaoDuOrderCell

+ (instancetype)TaskDiaoDuOrderCellWithTableView:(UITableView *)tableView {
    static NSString *cellID = @"TaskDiaoDuOrderCell";
    TaskDiaoDuOrderCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[TaskDiaoDuOrderCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
    }
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = Color_backgroundColor;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.bgView = [UIView new];
        self.bgView.backgroundColor = HexColor(0xffffff);
        self.bgView.layer.masksToBounds = YES;
        self.bgView.layer.cornerRadius = 6;
        [self.contentView addSubview:self.bgView];
        
        self.addressBGView = [UIView new];
        self.addressBGView.backgroundColor = HexColor(0xF7F7FA);
        self.addressBGView.layer.cornerRadius = 2;
        [self.bgView addSubview:self.addressBGView];
        
        self.fromAddLab = [UILabel new];
        self.fromAddLab.textColor = HexColor(0x2B2C44);
        self.fromAddLab.font = BoldFontOfSize(20);
        self.fromAddLab.textAlignment = NSTextAlignmentCenter;
        [self.addressBGView addSubview:self.fromAddLab];
        
        self.statusImgView = [UIImageView new];
        [self.addressBGView addSubview:self.statusImgView];
        
        self.toAddLab = [UILabel new];
        self.toAddLab.textColor = HexColor(0x2B2C44);
        self.toAddLab.font = BoldFontOfSize(20);
        self.toAddLab.textAlignment = NSTextAlignmentCenter;
        [self.addressBGView addSubview:self.toAddLab];

        self.faImgView = [UIImageView new];
        self.faImgView.image = [UIImage imageNamed:@"icon_add_ti"];
        [self.bgView addSubview:self.faImgView];
        
        self.faAddressLab = [UILabel new];
        self.faAddressLab.textColor = HexColor(0x2B2C44);
        self.faAddressLab.font = BoldFontOfSize(16);
        [self.bgView addSubview:self.faAddressLab];
        
        self.faDetailLab = [UILabel new];
        self.faDetailLab.textColor = HexColor(0x2B2C44);
        self.faDetailLab.font = BoldFontOfSize(14);
        self.faDetailLab.numberOfLines = 0;
        [self.bgView addSubview:self.faDetailLab];
        
        self.faInfoLab = [UILabel new];
        self.faInfoLab.textColor = HexColor(0x585974);
        self.faInfoLab.font = BoldFontOfSize(12);
        self.faInfoLab.numberOfLines = 0;
        [self.bgView addSubview:self.faInfoLab];
        
        self.shouImgView = [UIImageView new];
        self.shouImgView.image = [UIImage imageNamed:@"icon_add_song"];
        [self.bgView addSubview:self.shouImgView];
        
        self.shAddressLab = [UILabel new];
        self.shAddressLab.textColor = HexColor(0x2B2C44);
        self.shAddressLab.font = BoldFontOfSize(16);
        [self.bgView addSubview:self.shAddressLab];
        
        self.shDetailLab = [UILabel new];
        self.shDetailLab.textColor = HexColor(0x2B2C44);
        self.shDetailLab.font = BoldFontOfSize(14);
        self.shDetailLab.numberOfLines = 0;
        [self.bgView addSubview:self.shDetailLab];
        
        self.shInfoLab = [UILabel new];
        self.shInfoLab.textColor = HexColor(0x585974);
        self.shInfoLab.font = BoldFontOfSize(12);
        self.shInfoLab.numberOfLines = 0;
        [self.bgView addSubview:self.shInfoLab];
        
        self.marginLine = [UILabel new];
        self.marginLine.backgroundColor = Color_backgroundColor;
        [self.bgView addSubview:self.marginLine];
        
        self.linkLine = [UILabel new];
        self.linkLine.backgroundColor = HexColorA(0x3D68EB, 0.2);
        [self.bgView addSubview:self.linkLine];
        
        self.marginLine2 = [UILabel new];
        self.marginLine2.backgroundColor = Color_backgroundColor;
        [self.bgView addSubview:self.marginLine2];
        
        self.goodTitleLab = [UILabel new];
        self.goodTitleLab.textColor = HexColor(0x444444);
        self.goodTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodTitleLab];
        
        self.goodPieceTitleLab = [UILabel new];
        self.goodPieceTitleLab.textColor = HexColor(0x9C9DB3);
        self.goodPieceTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodPieceTitleLab];
        
        self.goodPieceLab = [UILabel new];
        self.goodPieceLab.textColor = HexColor(0x2B2C44);
        self.goodPieceLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodPieceLab];
        
        self.goodCountTitleLab = [UILabel new];
        self.goodCountTitleLab.textColor = HexColor(0x9C9DB3);
        self.goodCountTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodCountTitleLab];
        
        self.goodCountLab = [UILabel new];
        self.goodCountLab.textColor = HexColor(0x2B2C44);
        self.goodCountLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodCountLab];
        
        self.goodWeightTitleLab = [UILabel new];
        self.goodWeightTitleLab.textColor = HexColor(0x9C9DB3);
        self.goodWeightTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodWeightTitleLab];
        
        self.goodWeightLab = [UILabel new];
        self.goodWeightLab.textColor = HexColor(0x2B2C44);
        self.goodWeightLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodWeightLab];
        
        self.goodVolumeTitleLab = [UILabel new];
        self.goodVolumeTitleLab.textColor = HexColor(0x9C9DB3);
        self.goodVolumeTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodVolumeTitleLab];
        
        self.goodVolumeLab = [UILabel new];
        self.goodVolumeLab.textColor = HexColor(0x2B2C44);
        self.goodVolumeLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.goodVolumeLab];
        
        self.zhuangTitleLab = [UILabel new];
        self.zhuangTitleLab.textColor = HexColor(0x444444);
        self.zhuangTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangTitleLab];
        
        self.zhuangPieceTitleLab = [UILabel new];
        self.zhuangPieceTitleLab.textColor = HexColor(0x9C9DB3);
        self.zhuangPieceTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangPieceTitleLab];
        
        self.zhuangPieceLab = [UILabel new];
        self.zhuangPieceLab.textColor = HexColor(0x2B2C44);
        self.zhuangPieceLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangPieceLab];
        
        self.zhuangCountTitleLab = [UILabel new];
        self.zhuangCountTitleLab.textColor = HexColor(0x9C9DB3);
        self.zhuangCountTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangCountTitleLab];
        
        self.zhuangCountLab = [UILabel new];
        self.zhuangCountLab.textColor = HexColor(0x2B2C44);
        self.zhuangCountLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangCountLab];
        
        self.zhuangWeightTitleLab = [UILabel new];
        self.zhuangWeightTitleLab.textColor = HexColor(0x9C9DB3);
        self.zhuangWeightTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangWeightTitleLab];
        
        self.zhuangWeightLab = [UILabel new];
        self.zhuangWeightLab.textColor = HexColor(0x2B2C44);
        self.zhuangWeightLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangWeightLab];
        
        self.zhuangVolumeTitleLab = [UILabel new];
        self.zhuangVolumeTitleLab.textColor = HexColor(0x9C9DB3);
        self.zhuangVolumeTitleLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangVolumeTitleLab];
        
        self.zhuangVolumeLab = [UILabel new];
        self.zhuangVolumeLab.textColor = HexColor(0x2B2C44);
        self.zhuangVolumeLab.font = [UIFont systemFontOfSize:14];
        [self.bgView addSubview:self.zhuangVolumeLab];
    }
    return self;
}

-(void)setModel:(TaskDiaoDuOrderModel *)model {
    _model = model;
    [self configUI];
}

- (void)configUI {
    self.bgView.nim_left = 15;
    self.bgView.nim_top = 10;
    self.bgView.nim_width = ScreenW - 30;
    
    self.addressBGView.frame = CGRectMake(10, 15, self.bgView.nim_width - 20, 68);
    
    self.statusImgView.nim_width = 59;
    self.statusImgView.nim_height = 10;
    self.statusImgView.nim_left = (self.bgView.nim_width - self.statusImgView.nim_width) * 0.5;
    self.statusImgView.nim_centerY = self.addressBGView.nim_height * 0.5;
    [self.statusImgView setImage:[UIImage imageNamed:@"operationbill_status"]];
    
    self.fromAddLab.nim_left = 10;
    self.fromAddLab.text = self.model.s_city;
    [self.fromAddLab sizeToFit];
    self.fromAddLab.nim_width = self.statusImgView.nim_left - 20;
    self.fromAddLab.nim_centerY = self.statusImgView.nim_centerY;
    
    self.toAddLab.nim_left = 10 + self.statusImgView.nim_right;
    self.toAddLab.text = self.model.r_city;
    [self.toAddLab sizeToFit];
    self.toAddLab.nim_width = self.statusImgView.nim_left - 20;
    self.toAddLab.nim_centerY = self.statusImgView.nim_centerY;
    
    self.faAddressLab.text = [NSString stringWithFormat:@"%@ %@ %@",self.model.s_province,self.model.s_city,self.model.s_town];
    [self.faAddressLab sizeToFit];
    self.faAddressLab.nim_left = 59;
    self.faAddressLab.nim_top = 15 + self.addressBGView.nim_bottom;
    self.faAddressLab.nim_width = self.bgView.nim_width - 70 - 10 - self.faAddressLab.nim_left;
    
    self.faDetailLab.nim_width = self.faAddressLab.nim_width;
    self.faDetailLab.text = self.model.s_info;
    self.faDetailLab.nim_left = self.faAddressLab.nim_left;
    self.faDetailLab.nim_top = self.faAddressLab.nim_bottom + 5;
    [self.faDetailLab sizeToFit];
    self.faDetailLab.nim_width = self.faAddressLab.nim_width;
    
    self.faInfoLab.nim_width = self.faDetailLab.nim_width;
    self.faInfoLab.text = [NSString stringWithFormat:@"%@ %@",self.model.s_tel_name,self.model.s_phone];
    self.faInfoLab.nim_left = self.faDetailLab.nim_left;
    self.faInfoLab.nim_top = self.faDetailLab.nim_bottom + 10;
    [self.faInfoLab sizeToFit];
    self.faInfoLab.nim_width = self.faDetailLab.nim_width;
    
    
    self.marginLine.nim_left = self.faAddressLab.nim_left - 5;
    self.marginLine.nim_top = self.faInfoLab.nim_bottom + 10;
    self.marginLine.nim_width = self.bgView.nim_width - self.marginLine.nim_left;
    self.marginLine.nim_height = 1;

    self.shAddressLab.text = [NSString stringWithFormat:@"%@ %@ %@",self.model.r_province,self.model.r_city,self.model.r_town];
    [self.shAddressLab sizeToFit];
    self.shAddressLab.nim_left = 59;
    self.shAddressLab.nim_top = 10 + self.marginLine.nim_bottom;
    self.shAddressLab.nim_width = self.bgView.nim_width - 70 - 10 - self.shAddressLab.nim_left;
    
    self.shDetailLab.nim_width = self.shAddressLab.nim_width;
    self.shDetailLab.text = self.model.r_info;
    self.shDetailLab.nim_left = self.shAddressLab.nim_left;
    self.shDetailLab.nim_top = self.shAddressLab.nim_bottom + 5;
    [self.shDetailLab sizeToFit];
    self.shDetailLab.nim_width = self.shAddressLab.nim_width;
    
    self.shInfoLab.nim_width = self.shDetailLab.nim_width;
    self.shInfoLab.text = [NSString stringWithFormat:@"%@ %@",self.model.r_tel_name,self.model.r_phone];
    self.shInfoLab.nim_left = self.shDetailLab.nim_left;
    self.shInfoLab.nim_top = self.shDetailLab.nim_bottom + 10;
    [self.shInfoLab sizeToFit];
    self.shInfoLab.nim_width = self.shDetailLab.nim_width;
    
    self.faImgView.nim_width = 22;
    self.faImgView.nim_height = 22;
    self.faImgView.nim_left = 20;
    self.faImgView.nim_top = (self.marginLine.nim_top - self.addressBGView.nim_bottom - self.faImgView.nim_width) * 0.5 + self.addressBGView.nim_bottom;
    
    self.shouImgView.nim_width = 22;
    self.shouImgView.nim_height = 22;
    self.shouImgView.nim_left = 20;
    self.shouImgView.nim_top = self.shInfoLab.nim_bottom + 15 - (self.shInfoLab.nim_bottom + 15 - self.marginLine.nim_bottom - self.shouImgView.nim_height) * 0.5 - self.shouImgView.nim_height;
    
    self.linkLine.nim_width = 2;
    self.linkLine.nim_top = self.faImgView.nim_bottom + 3;
    self.linkLine.nim_height = self.shouImgView.nim_top - 3 - self.linkLine.nim_top;
    self.linkLine.nim_centerX = self.faImgView.nim_centerX;
    
    self.marginLine2.frame = CGRectMake(10, self.shInfoLab.nim_bottom + 15, self.bgView.nim_width - 10, 2);
    
    self.goodTitleLab.text = @"货物信息";
    [self.goodTitleLab sizeToFit];
    self.goodTitleLab.nim_left = 10;
    self.goodTitleLab.nim_top = self.marginLine2.nim_bottom + 10;
    
    self.goodPieceTitleLab.text = @"货物件数：";
    [self.goodPieceTitleLab sizeToFit];
    self.goodPieceTitleLab.nim_left = 10;
    self.goodPieceTitleLab.nim_top = self.goodTitleLab.nim_bottom + 5;
    
    __block int pnum = 0;
    __block int num = 0;
    __block int select_pnum = 0;
    __block int select_num = 0;
    [self.model.goods_list enumerateObjectsUsingBlock:^(TaskDiaoDuOrderGoodModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        pnum += obj.pnum;
        num += obj.num;
        select_pnum += obj.select_pnum;
        select_num += obj.select_num;
    }];
    self.goodPieceLab.text = [NSString stringWithFormat:@"%d",pnum];
    [self.goodPieceLab sizeToFit];
    self.goodPieceLab.nim_left = self.goodPieceTitleLab.nim_right;
    self.goodPieceLab.nim_centerY = self.goodPieceTitleLab.nim_centerY;
    self.goodPieceLab.nim_width = self.bgView.nim_width * 0.5 - 10 - self.goodPieceLab.nim_left;
    
    self.goodCountTitleLab.text = @"数量：";
    [self.goodCountTitleLab sizeToFit];
    self.goodCountTitleLab.nim_left = self.bgView.nim_width * 0.5;
    self.goodCountTitleLab.nim_top = self.goodTitleLab.nim_bottom + 5;
    
    self.goodCountLab.text = [NSString stringWithFormat:@"%d",num];
    [self.goodCountLab sizeToFit];
    self.goodCountLab.nim_left = self.goodCountTitleLab.nim_right;
    self.goodCountLab.nim_centerY = self.goodCountTitleLab.nim_centerY;
    self.goodCountLab.nim_width = self.bgView.nim_width - 10 - self.goodCountLab.nim_left;
    
    self.goodWeightTitleLab.text = @"货物重量：";
    [self.goodWeightTitleLab sizeToFit];
    self.goodWeightTitleLab.nim_left = 10;
    self.goodWeightTitleLab.nim_top = self.goodPieceTitleLab.nim_bottom + 5;
    
    __block CGFloat allWeight = 0.0;
    __block CGFloat allVolume = 0.0;
    __block CGFloat selectWeight = 0.0;
    __block CGFloat selectVolume = 0.0;
    [self.model.goods_list enumerateObjectsUsingBlock:^(TaskDiaoDuOrderGoodModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        allWeight += obj.residue_weight;
        allVolume += obj.residue_volume;
        selectWeight += obj.select_weight;
        selectVolume += obj.select_volume;
    }];
    self.goodWeightLab.text = allWeight ? [NSString stringWithFormat:@"%@KG",[FactoryMethod removerNumberWithZero:[NSString stringWithFormat:@"%.2f",allWeight]]] : @"--KG";
    [self.goodWeightLab sizeToFit];
    self.goodWeightLab.nim_left = self.goodWeightTitleLab.nim_right;
    self.goodWeightLab.nim_centerY = self.goodWeightTitleLab.nim_centerY;
    self.goodWeightLab.nim_width = self.bgView.nim_width * 0.5 - 10 - self.goodWeightLab.nim_left;
    
    self.goodVolumeTitleLab.text = @"货物体积：";
    [self.goodVolumeTitleLab sizeToFit];
    self.goodVolumeTitleLab.nim_left = self.bgView.nim_width * 0.5;
    self.goodVolumeTitleLab.nim_top = self.goodWeightTitleLab.nim_top;
    
    self.goodVolumeLab.text = allVolume ? [NSString stringWithFormat:@"%@m³",[FactoryMethod removerNumberWithZero:[NSString stringWithFormat:@"%.2f",allVolume]]] : @"--m³";
    [self.goodVolumeLab sizeToFit];
    self.goodVolumeLab.nim_left = self.goodVolumeTitleLab.nim_right;
    self.goodVolumeLab.nim_centerY = self.goodVolumeTitleLab.nim_centerY;
    self.goodVolumeLab.nim_width = self.bgView.nim_width - 10 - self.goodVolumeLab.nim_left;
    
    
    
    
    self.zhuangTitleLab.text = @"本次装载信息";
    [self.zhuangTitleLab sizeToFit];
    self.zhuangTitleLab.nim_left = 10;
    self.zhuangTitleLab.nim_top = self.goodWeightTitleLab.nim_bottom + 10;
    
    self.zhuangPieceTitleLab.text = @"货物件数：";
    [self.zhuangPieceTitleLab sizeToFit];
    self.zhuangPieceTitleLab.nim_left = 10;
    self.zhuangPieceTitleLab.nim_top = self.zhuangTitleLab.nim_bottom + 5;
    
    self.zhuangPieceLab.text = [NSString stringWithFormat:@"%d",select_pnum];
    [self.zhuangPieceLab sizeToFit];
    self.zhuangPieceLab.nim_left = self.zhuangPieceTitleLab.nim_right;
    self.zhuangPieceLab.nim_centerY = self.zhuangPieceTitleLab.nim_centerY;
    self.zhuangPieceLab.nim_width = self.bgView.nim_width * 0.5 - 10 - self.zhuangPieceLab.nim_left;
    
    self.zhuangCountTitleLab.text = @"数量：";
    [self.zhuangCountTitleLab sizeToFit];
    self.zhuangCountTitleLab.nim_left = self.bgView.nim_width * 0.5;
    self.zhuangCountTitleLab.nim_top = self.zhuangTitleLab.nim_bottom + 5;
    
    self.zhuangCountLab.text = [NSString stringWithFormat:@"%d",select_num];
    [self.zhuangCountLab sizeToFit];
    self.zhuangCountLab.nim_left = self.zhuangCountTitleLab.nim_right;
    self.zhuangCountLab.nim_centerY = self.zhuangCountTitleLab.nim_centerY;
    self.zhuangCountLab.nim_width = self.bgView.nim_width - 10 - self.zhuangCountLab.nim_left;
    
    
    self.zhuangWeightTitleLab.text = @"货物重量：";
    [self.zhuangWeightTitleLab sizeToFit];
    self.zhuangWeightTitleLab.nim_left = 10;
    self.zhuangWeightTitleLab.nim_top = self.zhuangPieceTitleLab.nim_bottom + 5;
    
    self.zhuangWeightLab.text = selectWeight ? [NSString stringWithFormat:@"%@KG",[FactoryMethod removerNumberWithZero:[NSString stringWithFormat:@"%.2f",selectWeight]]] : @"--KG";
    [self.zhuangWeightLab sizeToFit];
    self.zhuangWeightLab.nim_left = self.zhuangWeightTitleLab.nim_right;
    self.zhuangWeightLab.nim_centerY = self.zhuangWeightTitleLab.nim_centerY;
    self.zhuangWeightLab.nim_width = self.bgView.nim_width * 0.5 - 10 - self.zhuangWeightLab.nim_left;
    
    self.zhuangVolumeTitleLab.text = @"货物体积：";
    [self.zhuangVolumeTitleLab sizeToFit];
    self.zhuangVolumeTitleLab.nim_left = self.bgView.nim_width * 0.5;
    self.zhuangVolumeTitleLab.nim_top = self.zhuangWeightTitleLab.nim_top;
    
    self.zhuangVolumeLab.text = selectVolume ? [NSString stringWithFormat:@"%@m³",[FactoryMethod removerNumberWithZero:[NSString stringWithFormat:@"%.2f",selectVolume]]] : @"--m³";
    [self.zhuangVolumeLab sizeToFit];
    self.zhuangVolumeLab.nim_left = self.zhuangVolumeTitleLab.nim_right;
    self.zhuangVolumeLab.nim_centerY = self.zhuangVolumeTitleLab.nim_centerY;
    self.zhuangVolumeLab.nim_width = self.bgView.nim_width - 10 - self.zhuangVolumeLab.nim_left;
    

    self.bgView.nim_height = self.zhuangWeightTitleLab.nim_bottom + 20;
    
    self.height = self.bgView.nim_bottom;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
